package cn.com.chinact.drools.demo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import cn.com.chinact.drools.demo.service.DroolsService;

@RestController
@RequestMapping("/test")
public class TestController {
	@Autowired
	private DroolsService droolsService;

	@GetMapping("/showRults/{status}/{mes}")
	public String showRults(@PathVariable("status") Integer status, @PathVariable("mes") String mes) {
		return droolsService.fireRule(status, mes);
	}

}
